<div class="user_head_info">
    <div class="user_ava"> 
        <?php if($user['avatar']) : ?>
        <img src="/images/uploads/userAvatars/<?php echo $user['avatar']; ?>" style="width:30px; height: 30px;"/>
        <?php else : ?>
        <img src="/images/prettyImg/default-avatarl.jpg" width="45px" alt="" />
        <?php endif; ?>
    </div>    
    <span class="profile_username"><?php echo $user['displayName']; ?></span><br/>
   <span class="last_login">Последний раз был   <?php echo Yii::app()->dateFormatter->format("dd MMMM в HH:mm", Yii::app()->user->getState('logDate')); ?></span> 
  
</div>


<?php $this->renderPartial('//partials/userMenu', array('userName'=>$user['login'], 'countNewComments'=>$this->countNewComments['count'], 'countNewMessages'=>$this->countNewMessages['count'],'curent'=>'forum')); ?>

<div class="padding040">
<h2 class="profil_h2">Свежие сообщения на минифорумах</h2>

    <?php if(!empty($messages)) : ?>
        <?php for($i=0; $i<count($messages); $i++) : ?>
            <?php $paramsArr = array('url'=>$messages[$i]['url'], 'partnerUrl'=>$messages[$i]['partnerUrl'], 'catId'=>$messages[$i]['catId']) ; ?>
           <div class="profil_review_header"><span class="dark"> <?php echo $messages[$i]['catName'].'</span> | '.$messages[$i]['name']; ?> 
            
            <?php if(!empty($messages[$i]['subCats'])) : ?>
                          <ul  class="inline unstyled profile_subcats">
                <?php for($l=0; $l<count($messages[$i]['subCats']); $l++) : ?>
                     <li class="subcats<?php echo $l;  ?>">
                        <a href="<?php echo Yii::app()->createUrl('partner/default/cat', array('catId'=>$messages[$i]['subCats'][$l]['catId'], 'parentId'=>$messages[$i]['subCats'][$l]['parentId'])); ?>"> <?php echo $messages[$i]['subCats'][$l]['name']; ?> </a>
                    </li>&nbsp;&nbsp;
                <?php endfor; ?>
                    </ul>
            <?php endif; ?>
            </div>
          <div class="last_comment">
                <a  class="head" href="<?php echo Yii::app()->createUrl('partner/forum/theme', $paramsArr);?>">
                    <?php echo   CPartnerkiHelper::getShortText($messages[$i]['title'], 80); ?>
                </a>
              
                  <div class="short_conmment">    
                <div class="reviews_date">   
                <?php echo Yii::app()->dateFormatter->format("dd MMMM yyyy ", $messages[$i]['comDate']); ?></div>
                <?php $mes = preg_replace('/\[quote([\s\S]*)\[\/quote\]/', '', $messages[$i]['text']); ?>
              <?php echo CPartnerkiHelper::getShortText($mes, 250);  ?>
              </div>
            </div> 
       <?php endfor; ?>
    <?php else : ?>
      <p align="center">  Пользователь пока не оставил ни одного сообщения на мини-форуме</p>
    <?php endif; ?>


<div class="pages">
    <?php $this->widget('CLinkPager', array('pages' => $pagination)); ?> 
</div>  


</div>